import request from '@/utils/request'

export default {

    getSectionList() {
        return request({
            url: `/manager/section/findAll`,
            method: 'get'
        })
    },
   // current: 当前页  limit：每页记录数  sectionQuery：条件对象
    getSectionListPage(current, limit, sectionQuery) {
        return request({
           url: `/manager/section/pageSectionCondition/${current}/${limit}`,
            method: 'post',
           //data: 表示对象转换json进行传递到接口里面
            data: sectionQuery
        })
    },
   deleteSectionId(id) {
        return request({
            url: `/manager/section/${id}`,
            method: 'delete'
        })
    },
   addSection(section) {
        return request({
            url: `/manager/section/addSection`,
            method: 'post',
            data: section
        })
    },
   getSectionInfo(id) {
        return request({
            url: `/manager/section/getSection/${id}`,
            method: 'get'
        })
    },
   updateSection(section) {
        return request({
            url: `/manager/section/updateSection`,
            method: 'post',
            data: section
        })
    }
}
